package com.atguigu.gmall.feign.cart;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.cart.CartInfo;
import com.atguigu.gmall.model.product.SkuInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RequestMapping("/api/cart")
@FeignClient("service-cart")
public interface CartFeignClient {

    @GetMapping("/addToCart")
    CartInfo addToCart(@RequestParam("skuId") Long skuId,
                       @RequestParam("skuNum") Integer skuNum);
 /*   @GetMapping("/listCart")
    List<CartInfo> listCart();*/
 @GetMapping("/cartListChecked")
    List<CartInfo> cartListChecked();

    @DeleteMapping("/deleteSku")
    Result deleteSkuFromCart(@RequestParam("skuIds") List<Long> skuIds);
}
